:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --info: #577590;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header h1 {
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
}

.actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn i {
    font-size: 0.9rem;
}

.btn.primary {
    background-color: var(--primary);
    color: white;
}

.btn.primary:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.3);
}

.btn.secondary {
    background-color: var(--light-gray);
    color: var(--dark);
}

.btn.secondary:hover {
    background-color: #d1d7e0;
}

.btn.danger {
    background-color: var(--danger);
    color: white;
}

.btn.danger:hover {
    background-color: #e5177b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(247, 37, 133, 0.3);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.6rem 1.2rem 0.6rem 2.5rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-size: 0.9rem;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.search-box i {
    position: absolute;
    left: 1rem;
    color: var(--gray);
}

.appointments-list {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.list-header {
    display: flex;
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    font-weight: 500;
}

.header-item {
    flex: 1;
    padding: 0 0.5rem;
}

.header-item:first-child {
    flex: 2;
}

.list-body {
    max-height: 600px;
    overflow-y: auto;
}

.appointment-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
    transition: all 0.3s ease;
}

.appointment-item:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.appointment-item > div {
    flex: 1;
    padding: 0 0.5rem;
}

.appointment-item > div:first-child {
    flex: 2;
    font-weight: 500;
}

.appointment-type {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    background-color: var(--light-gray);
    color: var(--dark);
}

.appointment-time {
    color: var(--gray);
    font-size: 0.9rem;
}

.status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.confirmed {
    background-color: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.status.pending {
    background-color: rgba(248, 150, 30, 0.1);
    color: var(--warning);
}

.status.cancelled {
    background-color: rgba(247, 37, 133, 0.1);
    color: var(--danger);
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gray);
}

.action-btn:hover {
    background-color: var(--light-gray);
    color: var(--primary);
}

.action-btn.view {
    color: var(--primary);
}

.action-btn.delete {
    color: var(--danger);
}

.action-btn.edit {
    color: var(--warning);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: modalFadeIn 0.3s ease;
}

.modal-content.small {
    max-width: 400px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.3rem;
    color: var(--dark);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--dark);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.detail-row {
    display: flex;
    margin-bottom: 1rem;
}

.detail-label {
    flex: 0 0 120px;
    font-weight: 500;
    color: var(--gray);
}

.detail-value {
    flex: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .actions {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .list-header {
        display: none;
    }
    
    .appointment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1.5rem;
    }
    
    .appointment-item > div {
        flex: 1;
        width: 100%;
        padding: 0;
    }
    
    .actions-cell {
        margin-top: 1rem;
        align-self: flex-end;
    } 
}